<div class="left">
    <div class="wrap-page">
	<div class="title-page"><strong>Friends of <?php echo h($modelUser->username, 9) ?></strong></div>
	<div class="content-page">
	    <?php
	    $this->widget('bootstrap.widgets.TbGridView', array(
		'id' => 'post-grid',
		'dataProvider' => $model->search($modelUser->user_id),
		'filter' => $model,
		'columns' => array(
		    array(
			'header' => 'Avatar',
			'type' => 'raw',
			'value' => function($data) {
			    return '<img src="' . $data->user->getAvatarUrl('small') . '"/>';
			}
		    ),
		    array(
			'header' => 'Name',
			'name' => 'friendName',
			'type' => 'raw',
			'value' => function($data) {
			    return $data->user->getDisplayName();
			}
		    ),
		    array(
			'type' => 'raw',
			'value' => function($data) {
			    if (user()->id && user()->getModel()->status == User::STATUS_ACTIVE) {
				return $data->user->checkFriend(user()->id, $data->friend_user_id);
			    }
			}
		    )
		),
	    ));
	    ?>
	</div>
    </div>
</div>
<div class="right">
    <div class="box-right">
	<?php $this->renderPartial('_view/profile', array('modelUser' => $modelUser)); ?>

    </div><!--box-right-->
    <?php $this->widget('application.widgets.ad.Ad') ?>
</div><!--right-->